Skip to content

Pattern miner: Add curated link-checker archetype from upstream pattern mining - #264

Merged
pelikhan merged 1 commit into
mainfrom
pattern-mining/link-checker-archetype-ea822e081c5af0f6
Sep 8, 2026
Merged

Pattern miner: Add curated link-checker archetype from upstream pattern mining#264
pelikhan merged 1 commit into
mainfrom
pattern-mining/link-checker-archetype-ea822e081c5af0f6

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Upstream sources mined

  • githubnext-agentics/files/workflows/link-checker.md — daily scheduled workflow that pre-tests all documentation links deterministically in a steps: block, then uses cache-memory to track links previously confirmed unfixable, and opens a PR via create-pull-request with protected-files: fallback-to-issue and if-no-changes: warn, falling back to noop when nothing needs fixing.
  • githubnext-agentics/files/workflows/update-docs.md (line 99: "Check for broken links, missing images, or formatting issues") and github-gh-aw/files/.github/aw/triggers.md (line 19/41: "Govern documentation content (stale pages, broken links, outdated ownership)" / "Documentation governance: schedule (weekly) or pull_request... check stale ownership, broken links, and missing metadata") — corroborating upstream documentation recommending scheduled link/content governance as a recognized pattern distinct from general doc updates.

Recurring pattern found

A dedicated "check and fix broken links" shape recurs distinctly from the existing documentation-updater archetype: it is deterministic-first (pre-fetch/test links in steps: rather than agent judgment), uses cache-memory as a persistent skip-list for links with no available fix, and is scoped narrowly to link validity rather than general content accuracy. One direct upstream workflow (link-checker.md) demonstrates the full shape, corroborated by upstream triggers.md documentation explicitly calling out "broken links" governance as a canonical schedule-triggered pattern with its own create-issue/add-comment output guidance, satisfying the "one workflow + explicit doc recommendation" bar.

Why the existing library did not cover it

The existing documentation-updater archetype only generically mentions "Fix inaccuracies, broken links, and outdated examples" in its runtime body text, but its curated tips do not capture the two evidence-backed techniques that distinguish this shape: (1) pre-fetching/testing links deterministically before the agent starts, and (2) persisting a cache-memory list of confirmed-unfixable links to avoid repeated wasted retries on a recurring schedule. No archetype in patterns/archetypes/ or entry in patterns/manifest.json covers this narrower, deterministic-first link-checking shape.

What changed in patterns/

  • Added patterns/archetypes/link-checker.json — new curated archetype (success_rate: null, count: 0, top_repos: []) with schedule trigger, pull-requests safe output, and tips reflecting the deterministic pre-check + cache-memory skip-list pattern.
  • Appended "link-checker" to archetypes in patterns/manifest.json.
  • Added a link-checker entry to patterns/workflow-generation.json with icon, capabilities, permissions, and a prompt body reflecting the mined process (read pre-fetched results, consult cache memory, fix confirmed replacements, open PR or noop).

Validation

  • npm test — 18 test files, 319 tests passed.
  • npm run build — production build succeeded (site + patterns copied into dist/).

Candidates deliberately left out

  • Discussion task miner (discussion-task-miner.md) — only one upstream workflow demonstrates this shape (scan discussions → create issues); no corroborating upstream documentation recommends it as a distinct pattern, so it does not meet the two-workflow or doc-backed bar.
  • Sub-issue closer / hierarchy auto-close (sub-issue-closer.md) — largely already covered by the existing issue-hierarchy-manager archetype's update-issue/close-parent tips.
  • Editorial-board / unbloat-docs "PR cap gate" pre-activation step (tech-content-editorial-board.md, unbloat-docs.md) — a useful refinement, but scoped to code-improvement/documentation-updater tips that already mention the "skip scheduled runs once too many open PRs" guidance, so it is already represented.
  • Campaign/multi-agent-research design docs (campaign.md, multi-agent-research.md) — these are meta-guidance documents, not recurring workflow shapes from actual upstream workflows, so they don't meet the archetype bar.

Generated by Pattern Miner · copilot · auto · 105.9 AIC · ⌖ 14.4 AIC · ⊞ 8.5K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review September 8, 2026 12:50
Copilot AI lite review requested due to automatic review settings September 8, 2026 12:50
@pelikhan
pelikhan merged commit 71fcb49 into main Sep 8, 2026
1 check passed
@pelikhan
pelikhan deleted the pattern-mining/link-checker-archetype-ea822e081c5af0f6 branch September 8, 2026 12:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new link-checker workflow-generation entry currently can’t render required pre-steps (missing capabilities.pre_steps) and unconditionally requires cache-memory even though that tool isn’t enabled by default.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new curated link-checker archetype to the pattern library so the wizard can generate scheduled workflows focused on deterministic link validation + targeted fixes, distinct from the broader documentation-updater archetype.

Changes:

  • Added a new patterns/archetypes/link-checker.json curated archetype definition.
  • Registered the new archetype ID in patterns/manifest.json.
  • Added a new link-checker workflow-generation template in patterns/workflow-generation.json.
File summaries
File Description
patterns/workflow-generation.json Adds the workflow-generation template for the new link-checker archetype.
patterns/manifest.json Registers link-checker in the archetype list so it’s loadable by the app.
patterns/archetypes/link-checker.json Defines the curated archetype metadata, triggers, outputs, and tips for link checking.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1060 to +1062
"capabilities": {
"bash": true
},
Comment on lines +1074 to +1084
"1. Read the link check results collected in the pre-step",
"2. Load cache memory for previously confirmed unfixable links and skip them",
"3. For each broken link, research whether the content moved to a new URL, redirect, or official replacement",
"4. Fix links you can confirm a working replacement for; record unconfirmed ones in cache memory as unfixable",
"5. Open a pull request with the fixes, or call `noop` if nothing needed fixing",
"",
"## Constraints",
"",
"- **DO NOT** guess at replacement URLs without confirming they resolve.",
"- **DO NOT** modify relative links or anchors — only HTTP(S) links.",
"- **DO NOT** retry links already recorded as unfixable in cache memory without new evidence."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer kind: both (auto-dispatch found no TS/JS or UI/HTML changes — only JSON pattern data files).

No blocking issues found. This PR only adds/edits static JSON pattern data (patterns/archetypes/link-checker.json, patterns/manifest.json, patterns/workflow-generation.json) — no TypeScript/JS logic or UI/HTML behavior changed, so neither a Matt Pocock-style type-safety review nor a Ponytail-style UX review surfaces actionable findings. The JSON is well-formed and consistent with existing archetype entries. Note: PR is already merged, so this review is informational only.

Generated by Specialist PR Review for #264 · copilot · auto · 9.02 AIC · ⌖ 6.11 AIC · ⊞ 8.1K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants